# -*- coding: utf-8 -*-
from flask import Flask
from flask import render_template
from flask import request
from flask import jsonify


app = Flask(__name__)



@app.route('/')
def test():
    return render_template('test.html')


@app.route('/post_data/', methods=['POST'])
def post_it():
    data = request.form.to_dict()
    # print(data)
    return jsonify({'data': ' '.join([data['first'], data['second']])})


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8080)
